package com.cssiot.scala.basic



/*条件表达式（if）
循环表达式（no continue,no break）
语句终止(;no need)*/
class Basic2 {
  
}

/*class Person{
  var name:String=_
  val age=10;
  private[this] val sex="man"
}*/

class Person(var name:String){
  var age=0
  def this(test:String,age:Int){
    this(test)
    this.age=age
  }
     
  
}
  

object Basic2{
  
  def hello(name:String="old"):String={
     "hello:"+name;
    
  }
   def hello2(name:String="old"){
     "hello:"+name;
    
  }
  
   
 /* def main(args: Array[String]){
   val p=new Person("",55)
    p.name="jacking"
    println(p.name+":"+p.age)
    
  }*/
  def main(args: Array[String]): Unit = {
    print(hello2("jj"))
    
  }
}